<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<br>
			<div class="form-inline" role="form">
				<div class="form-group">
					<div class="input-group">
						<button type="button" class="btn btn-primary" ng-click="showAddModal();">新建</button>
					</div>
				</div>
			</div>
			<br>
			
			
			<!-- <table   bs-table-control="bsTableControl" ></table> -->
			
			<div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">角色管理</h4>
                </div>
                <div class="panel-body" >
                    <div  class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                       <div class="row">
                       
                     <!--    <div class="col-sm-12">
                           <div  class="dataTables_filter">
                           <label>Search:<input class="form-control input-sm" placeholder="" aria-controls="data-table" type="search"></label>
                           </div>
                        </div> -->
                        
                        </div>
                        
                        <div class="row">
                        
                        <div class="col-sm-12">
                        
                        <table  class="table table-striped table-bordered dataTable no-footer dtr-inline" role="grid" aria-describedby="data-table_info">
                        <thead>
                            <tr role="row">
                            <th rowspan="1" colspan="1"  >ID</th>
                            <th rowspan="1" colspan="1"  >名称</th>
                            <th rowspan="1" colspan="1"  >代码</th>
                             <th rowspan="1" colspan="1"  >分类</th>
                             <th rowspan="1" colspan="1"  >备注</th>
                             <th rowspan="1" colspan="1"  >创建时间</th>
                             <th rowspan="1" colspan="1"  >操作</th>
                            </tr>
                        </thead>
                        <tbody>
                      
                            <tr ng-class="{odd:($index%2)==0,even:($index%2)!=0}" ng-repeat="item in items track by $index"  class="gradeA" role="row">
                                <td class="sorting_1">{{item.id}}</td>
                                <td>{{item.nameZh}}</td>
                                <td>{{item.nameEn}}</td>
                                <td>{{item.category}}</td>
                                <td>{{item.description}}</td>
                                <td>{{item.createTime}}</td>
                                <td>
                                <button type="button"  class="btn btn-primary btn-xs m-r-5" ng-click="showEditModal(item);">编辑</button>
                             	<button type="button"  class="btn btn-danger btn-xs m-r-5"  ng-click="showPermissionTreeModal(item);">权限设置</button>
                   
                            	<button type="button" ng-show="item.nameEn!='ROLE_SUPER_ADMIN'" class="btn btn-danger btn-xs m-r-5"  ng-click="doDelete(item);">删除</button>
                             
                                </td>
                            </tr>
                            
                            </tbody>
                    </table>
                    </div>
                    </div>
                    <easy-ng-pagination></easy-ng-pagination>

                    </div>
                </div>
            </div>
			
    
    
			
			

		</div>
	</div>
</div>

                    <div class="modal fade" id="modal-add">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                    <h4 class="modal-title">新建</h4>
                                </div>
                                <div class="modal-body">
                                
                                    <div class="container-fluid">
        
                                              <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">名称</span>
                                                 <input type="text"  ng-model="entity.nameZh" class="form-control" placeholder="角色名称" aria-describedby="sizing-addon2" >
                                                 </div>
                                              </div>
                                              <br>
                                               <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">代码</span>
                                                 <input type="text"   ng-model="entity.nameEn" class="form-control" placeholder="角色代码" aria-describedby="sizing-addon2" data-toggle="popover" data-placement="top" data-content="请填写大写英文字母">
                                                 </div>
                                              </div> 
                                               <br>
                                               <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">分类</span>
                                                    <input type="text" ng-model="entity.category" class="form-control" placeholder="分类" aria-describedby="sizing-addon2"   >
                                                 </div>
                                              </div>
                                              <br>
                                              <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">备注</span>
                                                 <input type="text"  ng-model="entity.description" class="form-control" placeholder="备注" aria-describedby="sizing-addon2"   >
                                                 </div>
                                              </div>                 
                                            </div>
                                  
                                </div>
                                <div class="modal-footer">
                                    <a href="javascript:;" class="btn btn-sm btn-white" data-dismiss="modal">取消</a>
                                    <a href="javascript:;" class="btn btn-sm btn-primary" ng-click="save(entity);">保存</a>
                                </div>
                            </div>
                        </div>
                     </div>
                     
                     
                        <div class="modal fade" id="modal-edit">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                    <h4 class="modal-title">编辑</h4>
                                </div>
                                <div class="modal-body">
                                
                                    <div class="container-fluid">
        
                                              <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">名称</span>
                                                 <input type="text"  ng-model="editEntity.nameZh" class="form-control" placeholder="角色名称" aria-describedby="sizing-addon2" >
                                                 </div>
                                              </div>
                                              <br>
                                               <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">代码</span>
                                                 <input type="text"   ng-model="editEntity.nameEn" class="form-control" placeholder="角色代码" aria-describedby="sizing-addon2" data-toggle="popover" data-placement="top" data-content="请填写大写英文字母">
                                                 </div>
                                              </div> 
                                               <br>
                                               <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">分类</span>
                                                    <input type="text" ng-model="editEntity.category" class="form-control" placeholder="分类" aria-describedby="sizing-addon2"   >
                                                 </div>
                                              </div>
                                              <br>
                                              <div class="row">
                                                 <div class="col-md-12 input-group">
                                                 <span class="input-group-addon" id="sizing-addon1">备注</span>
                                                 <input type="text"  ng-model="editEntity.description" class="form-control" placeholder="备注" aria-describedby="sizing-addon2"   >
                                                 </div>
                                              </div>                 
                                            </div>
                                  
                                </div>
                                <div class="modal-footer">
                                    <a href="javascript:;" class="btn btn-sm btn-white" data-dismiss="modal">取消</a>
                                    <a href="javascript:;" class="btn btn-sm btn-primary" ng-click="update(editEntity);">保存</a>
                                </div>
                            </div>
                        </div>
                     </div>
                     
                     
                     
                     
<div class="modal fade " role="dialog" id="permissionTreeModal" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">{{editPermissionEntity.nameZh}}权限设置</h4>
      </div>
      <div class="modal-body">
      
      
					<ul class="nav nav-tabs">
						<li ng-class="{active:activeTab==0}"><a  ng-click="changeTab(0);" href="javascript:;" data-toggle="tab"  aria-expanded="true">菜单</a></li>
						<li ng-class="{active:activeTab==1}"><a  ng-click="changeTab(1);" href="javascript:;" data-toggle="tab" aria-expanded="false">功能点</a></li>
					
					</ul>
					<div class="tab-content">
						<div ng-class="{active:activeTab==0,in:activeTab==0}" class="tab-pane fade" >
						
						    <ul id="menuTree"  class="ztree" ng-model="menuTreeModel"  ></ul>
						    
							<p class="text-right m-b-0">
                             <a href="javascript:;"  ng-click="saveRescRole('menuTree','MENU');" class="btn btn-primary">保存</a>
							</p>
						</div>
						<div ng-class="{active:activeTab==1,in:activeTab==1}" class="tab-pane fade" >
						    <ul id="functionTree"  class="ztree" ng-model="functionTreeModel"  ></ul>
							<p class="text-right m-b-0">
                             <a href="javascript:;" ng-click="saveRescRole('functionTree','FUNCTION_POINT');" class="btn btn-primary">保存</a>
							</p>
						</div>
					
					</div>
	      </div>
     </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
   
